﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.IO;

namespace CSharpParser.SCharpType
{
    public class CSAssembly : Assembly
    {
        private Microsoft.RestrictedUsage.CSharp.Semantics.CSharpAssembly cSharpAssembly;

        public CSAssembly(Microsoft.RestrictedUsage.CSharp.Semantics.CSharpAssembly cSharpAssembly)
        {
            // TODO: Complete member initialization
            this.cSharpAssembly = cSharpAssembly;
        }

        public override string FullName
        {
            get
            {
                string assName = cSharpAssembly.GetAssemblyName().FullName;
                return assName;
            }
        }

        public override bool Equals(object o)
        {

            Assembly ass = o as Assembly;

            if (ass != null)
            {

                AssemblyName l =  cSharpAssembly.GetAssemblyName();

                return ass.FullName == l.FullName;
           
            }

            return base.Equals(o);
        }

    }
}
